home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / windownt / tusrc.zip / SRC / MAKEFILE.IN < prev    next >
Text File  |  1993-09-18  |  4KB  |  143 lines

  1. # Makefile for GNU textutils programs.
  2. # Do not use this makefile directly, but only from `../Makefile'.
  3. # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  4.  
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2, or (at your option)
  8. # any later version.
  9.  
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14.  
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. SHELL = /bin/sh
  20.  
  21. srcdir = @srcdir@
  22. VPATH = @srcdir@
  23.  
  24. SOURCES = cat.c cksum.c comm.c csplit.c cut.c \
  25. expand.c fold.c head.c join.c nl.c od.c \
  26. paste.c pr.c sort.c split.c sum.c tac.c \
  27. tail.c tr.c unexpand.c uniq.c wc.c version.c
  28.  
  29. DISTFILES = Makefile.in system.h version.h $(SOURCES)
  30.  
  31. PROGS = cat cksum comm csplit cut expand fold head join nl od \
  32. paste pr sort split sum tac tail tr unexpand uniq wc
  33.  
  34. all: $(PROGS) $(LIBPROGS)
  35.  
  36. incl = -I$(srcdir) -I$(srcdir)/../lib
  37. .c.o:
  38.     $(CC) -c $(DEFS) $(incl) $(CPPFLAGS) $(CFLAGS) $<
  39.  
  40. install: all
  41.     for f in $(PROGS); do $(INSTALL_PROGRAM) $$f $(bindir)/$(binprefix)$$f; done
  42.  
  43. uninstall:
  44.     for f in $(PROGS); do rm -f $(bindir)/$(binprefix)$$f; done
  45.  
  46. TAGS: $(SOURCES)
  47.     etags $(SOURCES)
  48.  
  49. clean:
  50.     rm -f $(PROGS) $(LIBPROGS) *.o core
  51.  
  52. mostlyclean: clean
  53.  
  54. distclean: clean
  55.     rm -f Makefile
  56.  
  57. realclean: distclean
  58.     rm -f TAGS
  59.  
  60. dist:
  61.     ln $(DISTFILES) ../`cat ../.fname`/src
  62.  
  63. # Linking rules.
  64.  
  65. $(PROGS): ../lib/libtu.a version.o
  66.  
  67. cat: cat.o
  68.     $(CC) $(LDFLAGS) -o $@ cat.o ../lib/libtu.a version.o $(LIBS)
  69.  
  70. cksum: cksum.o
  71.     $(CC) $(LDFLAGS) -o $@ cksum.o ../lib/libtu.a version.o $(LIBS)
  72.  
  73. comm: comm.o
  74.     $(CC) $(LDFLAGS) -o $@ comm.o ../lib/libtu.a version.o $(LIBS)
  75.  
  76. csplit: csplit.o
  77.     $(CC) $(LDFLAGS) -o $@ csplit.o ../lib/libtu.a version.o $(LIBS)
  78.  
  79. cut: cut.o
  80.     $(CC) $(LDFLAGS) -o $@ cut.o ../lib/libtu.a version.o $(LIBS)
  81.  
  82. expand: expand.o
  83.     $(CC) $(LDFLAGS) -o $@ expand.o ../lib/libtu.a version.o $(LIBS)
  84.  
  85. fold: fold.o
  86.     $(CC) $(LDFLAGS) -o $@ fold.o ../lib/libtu.a version.o $(LIBS)
  87.  
  88. head: head.o
  89.     $(CC) $(LDFLAGS) -o $@ head.o ../lib/libtu.a version.o $(LIBS)
  90.  
  91. join: join.o
  92.     $(CC) $(LDFLAGS) -o $@ join.o ../lib/libtu.a version.o $(LIBS)
  93.  
  94. nl: nl.o
  95.     $(CC) $(LDFLAGS) -o $@ nl.o ../lib/libtu.a version.o $(LIBS)
  96.  
  97. od: od.o
  98.     $(CC) $(LDFLAGS) -o $@ od.o ../lib/libtu.a version.o $(LIBS)
  99.  
  100. paste: paste.o
  101.     $(CC) $(LDFLAGS) -o $@ paste.o ../lib/libtu.a version.o $(LIBS)
  102.  
  103. pr: pr.o
  104.     $(CC) $(LDFLAGS) -o $@ pr.o ../lib/libtu.a version.o $(LIBS)
  105.  
  106. sort: sort.o
  107.     $(CC) $(LDFLAGS) -o $@ sort.o ../lib/libtu.a version.o $(LIBS)
  108.  
  109. split: split.o
  110.     $(CC) $(LDFLAGS) -o $@ split.o ../lib/libtu.a version.o $(LIBS)
  111.  
  112. sum: sum.o
  113.     $(CC) $(LDFLAGS) -o $@ sum.o ../lib/libtu.a version.o $(LIBS)
  114.  
  115. tac: tac.o
  116.     $(CC) $(LDFLAGS) -o $@ tac.o ../lib/libtu.a version.o $(LIBS)
  117.  
  118. tail: tail.o
  119.     $(CC) $(LDFLAGS) -o $@ tail.o ../lib/libtu.a version.o $(LIBS)
  120.  
  121. tr: tr.o
  122.     $(CC) $(LDFLAGS) -o $@ tr.o ../lib/libtu.a version.o $(LIBS)
  123.  
  124. unexpand: unexpand.o
  125.     $(CC) $(LDFLAGS) -o $@ unexpand.o ../lib/libtu.a version.o $(LIBS)
  126.  
  127. uniq: uniq.o
  128.     $(CC) $(LDFLAGS) -o $@ uniq.o ../lib/libtu.a version.o $(LIBS)
  129.  
  130. wc: wc.o
  131.     $(CC) $(LDFLAGS) -o $@ wc.o ../lib/libtu.a version.o $(LIBS)
  132.  
  133. # Compilation rules.
  134.  
  135. nl.o tac.o: ../lib/regex.h
  136. comm.o nl.o uniq.o: ../lib/linebuffer.h
  137. cat.o cksum.o comm.o csplit.o cut.o expand.o fold.o head.o: system.h
  138. join.o nl.o od.o paste.o pr.o sort.o split.o sum.o tac.o: system.h
  139. tail.o tr.o unexpand.o uniq.o wc.o: system.h
  140.  
  141. # Prevent GNU make v3 from overflowing arg limit on SysV.
  142. .NOEXPORT:
  143.